<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-left">
							<button id="payBtn" shiro:hasPermission="finance:refund:batchRefund"  type="button" class="btn  btn-danger"
									onclick="batchRefund()"><i class="fa fa-check" aria-hidden="true"></i>批量退款
							</button>
						</div>
						<div class="columns pull-right" role="group">
							<button class="btn btn-success" onclick="reLoad()">
								<i class="fa fa-search" aria-hidden="true"></i>查询
							</button>
							<button class="btn btn-danger" shiro:hasPermission="finance:refund:export" onclick="exportRefunds()">
								<i class="fa fa-mail-reply-all" aria-hidden="true"></i>导出
							</button>
						</div>

						<div class="columns pull-right col-md-1 nopadding">
							<select data-placeholder="退款状态" class="form-control chosen-select" id="status" name="status" tabindex="2">
								<option value="0" selected>待审核</option>
								<option value="1" selected>待退款</option>
								<option value="2">已退款</option>
								<option value="-1">已拒绝</option>
							</select>
						</div>

                        <div class="pull-right search col-md-1 nopadding">
                            <input id="queryItem" type="text" class="form-control" placeholder="查询关键字">
                        </div>


                        <input type="hidden" name="centreId" th:value="${centreId}" th:if="${flag} == '1'">
                        <div class="columns pull-right col-md-1 nopadding" th:if="${flag} == '0'">
                            <select data-placeholder="商户" class="form-control chosen-select"
                                    name="centreId" tabindex="2">
                                <option value="">选择商户</option>
                                <option th:each="item: ${centreList}" th:text="${item.name}"
                                        th:value="${item.centreId}"></option>
                            </select>
                        </div>

                        <div class="columns pull-right col-md-1 nopadding">
                            <input type="text" class=" form-control"
                                   id="end" name="end" placeholder="请选择结束日期"
                                   onclick="laydate({istime: true, format: 'YYYY-MM-DD  hh:mm:ss'})"
                                   style="background-color: #fff;" readonly="readonly"/>
                        </div>

                        <div class="columns pull-right">
                            <label style="font-weight: 700;float: left;padding: 3px 10px;line-height: 2;font-size: 15px">
                                <i class="fa fa-exchange"></i>
                            </label>
                        </div>
                        <div class="columns pull-right col-md-1 nopadding">
                            <input type="text" class=" form-control"
                                   id="start" name="start" placeholder="请选择开始日期"
                                   onclick="laydate({istime: true, format: 'YYYY-MM-DD  hh:mm:ss'})"
                                   style="background-color: #fff;" readonly="readonly"/>
                        </div>
					</div>
					<table id="orderTable" data-mobile-responsive="true"></table>
				</div>
			</div>
		</div>

		<div>
			<script type="text/javascript">
				var s_detail_h = 'hidden';
				var s_close_h = 'hidden';
				var s_refund_check_h = 'hidden';
			</script>
		</div>
		<div shiro:hasPermission="finance:refund:detail">
			<script type="text/javascript">
				s_detail_h = '';
			</script>
		</div>
		<div shiro:hasPermission="finance:refund:close">
			<script type="text/javascript">
				s_close_h = '';
			</script>
		</div>
		<div shiro:hasPermission="finance:refund:confirmRefund">
			<script type="text/javascript">
				s_refund_check_h = '';
			</script>
		</div>
	</div>
	<div th:include="order/include :: footer"></div>
	<script type="text/javascript" src="/js/appjs/finance/refund/refunds.js"></script>
</body>
</html>